package com.hardydou.pm.service.impl;

import com.hardydou.pm.mapper.PmTaskMapper;
import com.hardydou.pm.model.PmTask;
import com.hardydou.pm.service.IPmTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author ：hardy
 * @description：
 * @date ：Created in 2020/11/18
 * @Copyright ：Hardydou.com
 */
@Service
public class PmTaskServiceImpl implements IPmTaskService {


    @Autowired
    PmTaskMapper taskMapper;

    @Override
    public int deleteByPrimaryKey(Integer taskId) {
        return 0;
    }

    @Override
    public int insert(PmTask record) {
        Date date=new Date();
        record.setCtime(date);
        record.setUtime(date);
        return taskMapper.insertSelective(record);
    }

    @Override
    public int insertSelective(PmTask record) {
        Date date=new Date();
        record.setCtime(date);
        record.setUtime(date);
        return taskMapper.insertSelective(record);
    }

    @Override
    public PmTask selectByPrimaryKey(Integer taskId) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(PmTask record) {
        return taskMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(PmTask record) {
        return 0;
    }

    @Override
    public List<PmTask> list(Map params) {
        return taskMapper.list(params);
    }
}
